﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utils.Extention;
#region Version Info
/* ========================================================================
* 【本页面功能概述】
*
* 作者：wangjianfeng 创建时间：2012/9/22 17:30:44
* 文件名：Ask.cs
*
* 修改者： 时间：
* 修改说明：
* ========================================================================
*/
#endregion
namespace ChinaLeg.Web
{
    public partial class Ask : System.Web.UI.Page
    {
        protected string title, description, keyWrods,bgImage,adScroll;
        
        protected int catid;
        protected void Page_Load(object sender, EventArgs e)
        {
            catid = 12;
            if (!this.IsPostBack)
            {
                ChinaLeg.Cache.Category.Instance.GetModel(catid, out title, out  keyWrods, out  description, out  bgImage);
                Top1.CatId = catid;
                Top1.BgImage = bgImage;
                adScroll = ChinaLeg.Cache.ScrollFocusPicture.Instance.GetList(catid);

                BindNews(rpt51, 51);
                BindNews(rpt52, 52);
                BindNews(rpt53, 53);
                BindNews(rpt54, 54);
                BindNews(rpt55, 55);
                BindNews(rpt56, 56);
                BindNews(rpt57, 57);
                BindNews(rpt58, 58);
            }

        }

        private void BindNews(Repeater rpt, int catid)
        {
            rpt.DataSource = ChinaLeg.BLL.News.Instance.GetList(" and ListCommend=1 and catid=" + catid, 10, "ShowOrder", 0);
            rpt.DataBind();
        }
    }
}